#include "searchtop.h"

#include <WhaleButton>
#include <QHBoxLayout>

SearchTop::SearchTop( QWidget * parent ) : QWidget( parent ) {
    /*
    this->mCloseButton = new WhaleButton();
    this->mCloseButton->setText( "X" );
    this->mCloseButton->setObjectName( "searchCloseButton" );
    */

    this->mSearchLabel = new WhaleButton();
    this->mSearchLabel->setPixmap( QPixmap( ":/images/oxygen/search.png" ) );
    this->mSearchLabel->setObjectName( "searchLabel" );

    this->mSearchBox = new SearchBox();
    this->mSearchBox->setFocus();
    this->mSearchBox->setObjectName( "searchBox" );

    QHBoxLayout * topLayout = new QHBoxLayout();
    topLayout->addWidget( this->mSearchLabel );
    topLayout->addWidget( this->mSearchBox );
    // topLayout->addWidget( this->mCloseButton );

    this->setLayout( topLayout );
    this->setObjectName( "searchTop" );
}

SearchBox * SearchTop::searchBox() {
    return this->mSearchBox;
}

WhaleButton * SearchTop::searchLabel() {
    return this->mSearchLabel;
}

/*
WhaleButton * SearchTop::closeButton() {
    return this->mCloseButton;
}
*/
